<template>
  <div>
    <!--轮播组件-->
    <swiper :bannerList="bannerList" :isfull="true"></swiper>
    <ul class="mui-table-view mui-grid-view mui-grid-9">
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link to="/home/newsList">
          <img src="../../images/menu01.png" alt>
          <div class="mui-media-body">新闻资讯</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link to="/home/photoList">
          <img src="../../images/menu01.png" alt>
          <div class="mui-media-body">图片分享</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link to="/home/goodsList">
          <img src="../../images/menu01.png" alt>
          <div class="mui-media-body">商品购买</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link to="/home">
          <img src="../../images/menu01.png" alt>
          <div class="mui-media-body">留言反馈</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link to="/home">
          <img src="../../images/menu01.png" alt>
          <div class="mui-media-body">视频专区</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link to="/home">
          <img src="../../images/menu01.png" alt>
          <div class="mui-media-body">联系我们</div>
        </router-link>
      </li>
    </ul>
  </div>
</template>

<script>
import { Toast } from "mint-ui";
//导入轮播组件
import swiper from "../subcomponents/swiper.vue"
export default {
  data() {
    return {
      bannerList: []
    };
  },
  created() {
    this.getBanner();
  },
  methods: {
    getBanner() {
      //获取轮播图数据的方法
      this.$http
        .get(
          "banner#!method=get"
        )
        .then(result => {
          // console.log(result);
          if (result.status === 200) {
            this.bannerList = result.body.bannerList;
          } else {
            Toast("加载轮播图失败");
          }
        });
    }
  },
  components:{
    swiper
  }
};
</script>

<style lang="scss" scoped>
.mui-grid-view.mui-grid-9 {
  background: none;
  border: none;
  .mui-table-view-cell {
    background: none;
    border: none;
    img {
      max-width: 60px;
    }
    .mui-media-body {
      font-size: 13px;
    }
  }
}
</style>

